<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ionglobal.db.*" %>
<%@ page import="com.ionglobal.lib.*" %>
<%@ page import="com.ionglobal.cms.*" %>

<%@ include file="../init_include.jsp" %>

<%
	int check_rst=Permission.accept(dbi,session,request,"sysop","tree","catid","000000010"); 	
	if (check_rst!=Permission.CHECK_RST_SUCCESS) {
		dbi.closeAll();
		if (check_rst==Permission.CHECK_RST_DENY)
			response.sendRedirect("../deny.html");
		else
			response.sendRedirect("../index.jsp");
		return;		
	}	
	

	Integer id;
	Integer archiveNum;
	String sql="";
		
	archiveNum=new Integer(request.getParameter("archiveNum"));		
	for (int i=0;i<archiveNum.intValue();i++) {			
		if (request.getParameter("checkbox"+i)!=null)	{
			if (request.getParameter("text"+i)!=null)	{
				sql ="update cms_archive set crdate="+dbi.getInsertDate(request.getParameter("text"+i));
				sql+=" where id="+request.getParameter("checkbox"+i);
				Archive.updateArchive(dbi,sql);	
			}
		}		
	}
%>	
<script Language="JavaScript" src="../script/Ion_Show.js"></script> 
<script language="javascript">
	closewindow(0);
</script>	
<%@ include file="../init_free.jsp" %>
